package com.xyauto.theme.network.service

import com.xyauto.theme.BuildConfig
import com.xyauto.theme.Constant
import com.xyauto.theme.bean.NetworkThemeBean
import com.xyauto.theme.network.bean.BaseListBean
import okhttp3.ResponseBody
import retrofit2.http.*

interface ApiService {


    @FormUrlEncoded
    @POST("Api/Uitheme/getList")
    suspend fun getThemeList(
        @Field("type") type: Int,//1.公版 2.定制
        @Field("customer_code") customer_code: String? = null,//客户编号
        @Field("resolution") resolution: String,//分辨率
        @Field("ver") ver: String? = null,//公共库版本， 可以为空 ，否则不判断版本
        @Field("is_rotate") is_rotate: Int = 2,//是否旋转屏 1是 2否
        @Field("is_rotary") is_rotary: Int = 2,//是否旋钮机 1是 2否
        @Field("is_three_screen") is_three_screen: Int,//是否三分屏 1是 2否
        @Field("page") page: Int,//当前页码
        @Field("count") count: Int = 20,//每页记录数
        @Field("oauth_token") oauth_token: String = BuildConfig.OAUTH_TOKEN//每页记录数
    ): BaseListBean<NetworkThemeBean>


    @Streaming
    @GET
    suspend fun downloadFileAsync(@Url fileUrl: String): ResponseBody


}